﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Sispe.Entities;
using System.Data;
using System.Data.Objects;

namespace Sispe.Repository
{
    public class FotoRepository:MasterRepository,IFotoRepository
    {
        public FOTO GetAllFotoById(int id)
        {
            var query = from f in context.FOTOes
                        where f.IdTrabajador.Equals(id)
                        select f;

            ObjectContext.Refresh(RefreshMode.StoreWins, query);

            return query.SingleOrDefault();
        }
    }
}
